<?php
class EventController extends Apps_Controller_Action_Default {
    public function detailAction() {
        $id = intval($this->_request->getParam('id'));

        $eventModel = new M_Event();
        $event = $eventModel->getEventById($id)->query()->fetch();
        if(!$id || !$event) {
            $this->goBack();
        } else {
            $this->view->event = $event;

            $this->view->otherLink = $eventModel->listComingEvent()->query()->fetchAll();
        }
    }
}